#region Copyright(c) Anton Shelin, Vladimir Timashkov. All Rights Reserved.
// -----------------------------------------------------------------------------
// Copyright(c) 2010 Anton Shelin, Vladimir Timashkov. All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   1. No Trademark License - Microsoft Public License (Ms-PL) does not grant you rights to use
//      authors names, logos, or trademarks.
//   2. If you distribute any portion of the software, you must retain all copyright,
//      patent, trademark, and attribution notices that are present in the software.
//   3. If you distribute any portion of the software in source code form, you may do
//      so only under this license by including a complete copy of Microsoft Public License (Ms-PL)
//      with your distribution. If you distribute any portion of the software in compiled
//      or object code form, you may only do so under a license that complies with
//      Microsoft Public License (Ms-PL).
//   4. The names of the authors may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// The software is licensed "as-is." You bear the risk of using it. The authors
// give no express warranties, guarantees or conditions. You may have additional consumer
// rights under your local laws which this license cannot change. To the extent permitted
// under your local laws, the authors exclude the implied warranties of merchantability,
// fitness for a particular purpose and non-infringement.
// -----------------------------------------------------------------------------
#endregion

using System;

namespace SharpDom
{
    /// <summary>The alignment of data and the justification of text in a cell</summary>
    public enum Align
    {
        /// <summary>Left-flush data/Left-justify text. This is the default value for table data.</summary>
        left,
        /// <summary>Center data/Center-justify text. This is the default value for table headers.</summary>
        center,
        /// <summary>Right-flush data/Right-justify text.</summary>
        right,
        /// <summary>Double-justify text.</summary>
        justify,
        /// <summary>Align text around a specific character. If a user agent doesn't support character alignment,
        /// behavior in the presence of this value is unspecified. </summary>
        @char
    }

    /// <summary>Declares the type of the button</summary>
    public enum ButtonType
    {
        /// <summary>Creates a submit button. This is the default value. When activated, a submit button
        /// submits a form. A form may contain more than one submit button.</summary>
        submit,
        /// <summary>Creates a reset button. When activated, a reset button resets all controls to their initial values.</summary>
        reset,
        /// <summary>Creates a push button. Push buttons have no default behavior. Each push button may have
        /// client-side scripts associated with the element's event attributes. When an event occurs
        /// (e.g., the user presses the button, releases it, etc.), the associated script is triggered.</summary>
        button
    }

    /// <summary>When the type attribute has the value "radio" or "checkbox", this boolean attribute specifies
    /// that the button is on. User agents must ignore this attribute for other control types.</summary>
    public enum Checked { @checked }

    /// <summary>When present, this boolean attribute makes the current OBJECT definition a declaration only. 
    /// The object must be instantiated by a subsequent OBJECT definition referring to this declaration.</summary>
    public enum Declare { declare }

    /// <summary>When set, this boolean attribute provides a hint to the user agent that the script is 
    /// not going to generate any document content (e.g., no "document.write" in javascript) and thus, 
    /// the user agent can continue parsing and rendering.</summary>
    public enum Defer { defer }

    /// <summary>This attribute specifies the base direction of directionally neutral text
    /// (i.e., text that doesn't have inherent directionality) in an element's content and attribute values.
    /// It also specifies the directionality of tables.</summary>
    public enum Dir
    {
        /// <summary>Left-to-right text or table.</summary>
        ltr,
        /// <summary>Right-to-left text or table</summary>
        rtl
    }

    /// <summary>When set for a form control, this boolean attribute disables the control for user input</summary>
    public enum Disabled { disabled }

    /// <summary>This attribute specifies which sides of the frame surrounding a table will be visible</summary>
    public enum Frame
    {
        /// <summary>No sides. This is the default value.</summary>
        @void,
        /// <summary>The top side only.</summary>
        above,
        /// <summary>The bottom side only.</summary>
        below,
        /// <summary>The top and bottom sides only.</summary>
        hsides,
        /// <summary>The right and left sides only.</summary>
        vsides,
        /// <summary>The left-hand side only.</summary>
        lhs,
        /// <summary>The right-hand side only.</summary>
        rhs,
        /// <summary>All four sides.</summary>
        box,
        /// <summary>All four sides.</summary>
        border
    }

    /// <summary>This attribute specifies the type of control to create. The default value for this attribute is "text".</summary>
    public enum InputType
    {
        /// <summary>Creates a single-line text input control.</summary>
        text,
        /// <summary>Like "text", but the input text is rendered in such a way as to hide the characters (e.g., a series of asterisks).
        /// This control type is often used for sensitive input such as passwords.</summary>
        password,
        /// <summary>Creates a checkbox. Checkboxes are on/off switches that may be toggled by the user.</summary>
        checkbox,
        /// <summary>Creates a radio button. Radio buttons are like checkboxes except that when several share the same control name,
        /// they are mutually exclusive: when one is switched "on", all others with the same name are switched "off".</summary>
        radio,
        /// <summary>Creates a submit button. When activated, a submit button submits a form.</summary>
        submit,
        /// <summary>Creates a graphical submit button. The value of the src attribute specifies the URI of the image that will decorate the button.</summary>
        image,
        /// <summary>Creates a reset button. When activated, a reset button resets all controls to their initial values.</summary>
        reset,
        /// <summary>Creates a push button. Push buttons have no default behavior. Each push button may have client-side scripts
        /// associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.),
        /// the associated script is triggered.</summary>
        button,
        /// <summary>Creates a hidden control. Authors may create controls that are not rendered but whose values are 
        /// submitted with a form. Authors generally use this control type to store information between client/server exchanges
        /// that would otherwise be lost due to the stateless nature of HTTP.</summary>
        hidden,
        /// <summary>Creates a file select control. This control type allows the user to select files
        /// so that their contents may be submitted with a form.</summary>
        file,
    }

    /// <summary>It is only possible to define a server-side image map for the IMG and INPUT elements.
    /// In the case of IMG, the IMG must be inside an A element and the boolean attribute ismap must be set.
    /// In the case of INPUT, the INPUT must be of type "image".</summary>
    public enum IsMap { ismap }

    /// <summary>This attribute describes the relationship from the current document to the anchor specified by the href attribute.
    /// User agents, search engines, etc. may interpret these link types in a variety of ways.
    /// For example, user agents may provide access to linked documents through a navigation bar.</summary>
    [Flags]
    public enum LinkType
    {
        /// <summary>Designates substitute versions for the document in which the link occurs. When used together
        /// with the lang attribute, it implies a translated version of the document. When used together with the media attribute,
        /// it implies a version designed for a different medium (or media).</summary>
        alternate = 0x0001,
        /// <summary>Refers to a document serving as an appendix in a collection of documents.</summary>
        appendix = 0x0002,
        /// <summary>Refers to a bookmark. A bookmark is a link to a key entry point within an extended document.
        /// The title attribute may be used, for example, to label the bookmark.</summary>
        bookmark = 0x0004,
        /// <summary>Refers to a document serving as a chapter in a collection of documents.</summary>
        chapter = 0x0008,
        /// <summary>Refers to a document serving as a table of contents.
        /// Some user agents also support the synonym ToC (from "Table of Contents").</summary>
        contents = 0x0010,
        /// <summary>Refers to a copyright statement for the current document.</summary>
        copyright = 0x0020,
        /// <summary>Refers to a document providing a glossary of terms that pertain to the current document.</summary>
        glossary = 0x0040,
        /// <summary>Refers to a document providing an index for the current document.</summary>
        index = 0x0080,
        /// <summary>Refers to a document offering help (more information, links to other sources information, etc.)</summary>
        help = 0x0100,
        /// <summary>Refers to the next document in a linear sequence of documents.
        /// User agents may choose to preload the "next" document, to reduce the perceived load time.</summary>
        next = 0x0200,
        /// <summary>Refers to the previous document in an ordered series of documents.
        /// Some user agents also support the synonym "Previous".</summary>
        prev = 0x0400,
        /// <summary>Refers to a document serving as a section in a collection of documents.</summary>
        section = 0x0800,
        /// <summary>Refers to the first document in a collection of documents. This link type tells search engines 
        /// which document is considered by the author to be the starting point of the collection.</summary>
        start = 0x1000,
        /// <summary>Refers to an external style sheet. See the section on external style sheets for details. 
        /// This is used together with the link type "Alternate" for user-selectable alternate style sheets.</summary>
        stylesheet = 0x2000,
        /// <summary>Refers to a document serving as a subsection in a collection of documents.</summary>
        subsection = 0x4000
    }

    /// <summary>This attribute specifies the intended destination medium for style information.
    /// It may be a single media descriptor or a list. The default value for this attribute is "screen"</summary>
    [Flags]
    public enum Media
    {
        /// <summary>Suitable for all devices.</summary>
        all = 0xFF,
        /// <summary>Intended for speech synthesizers.</summary>
        aural = 0x01,
        /// <summary>Intended for braille tactile feedback devices.</summary>
        braille = 0x2,
        /// <summary>Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth).</summary>
        handheld = 0x4,
        /// <summary>Intended for paged, opaque material and for documents viewed on screen in print preview mode.</summary>
        print = 0x8,
        /// <summary>Intended for projectors.</summary>
        projection = 0x10,
        /// <summary>Intended for non-paged computer screens.</summary>
        screen = 0x20,
        /// <summary>Intended for media using a fixed-pitch character grid,
        /// such as teletypes, terminals, or portable devices with limited display capabilities.</summary>
        tty = 0x40,
        /// <summary>Intended for television-type devices (low resolution, color, limited scrollability).</summary>
        tv = 0x80
    }

    /// <summary>This attribute specifies which HTTP method will be used to submit the form data set.</summary>
    public enum Method
    {
        /// <summary>With the HTTP "get" method, the form data set is appended to the URI specified by the action attribute
        /// (with a question-mark ("?") as separator) and this new URI is sent to the processing agent.</summary>
        get,
        /// <summary>With the HTTP "post" method, the form data set is included in the body of the form and
        /// sent to the processing agent.</summary>
        post
    }

    /// <summary>If set, this boolean attribute allows multiple selections.
    /// If not set, the SELECT element only permits single selections.</summary>
    public enum Multiple { multiple }

    /// <summary>When set, this boolean attribute specifies that a region has no associated link.</summary>
    public enum NoHref { nohref }

    /// <summary>When present, this boolean attribute tells the user agent 
    /// that the frame window must not be resizeable.</summary>
    public enum NoResize { noresize }

    /// <summary>When set for a form control, this boolean attribute prohibits changes to the control.</summary>
    public enum ReadOnly { @readonly }

    /// <summary>This attribute specifies which rules will appear between cells within a table.
    /// The rendering of rules is user agent dependent.</summary>
    public enum Rules
    {
        /// <summary>No rules. This is the default value.</summary>
        none,
        /// <summary>Rules will appear between row groups (see THEAD, TFOOT, and TBODY)
        /// and column groups (see COLGROUP and COL) only.</summary>
        groups,
        /// <summary>Rules will appear between rows only.</summary>
        rows,
        /// <summary>Rules will appear between columns only.</summary>
        cols,
        /// <summary>Rules will appear between all rows and columns.</summary>
        all
    }

    /// <summary>This attribute specifies the set of data cells for which the current header cell 
    /// provides header information. This attribute may be used in place of the headers attribute,
    /// particularly for simple tables.</summary>
    public enum Scope
    {
        /// <summary>The current cell provides header information for the rest of the row that contains it</summary>
        row,
        /// <summary>The current cell provides header information for the rest of the column that contains it.</summary>
        col,
        /// <summary>The header cell provides header information for the rest of the row group that contains it.</summary>
        rowgroup,
        /// <summary>The header cell provides header information for the rest of the column group that contains it.</summary>
        colgroup
    }

    /// <summary>This attribute specifies scroll information for the frame window.</summary>
    public enum Scrolling
    {
        /// <summary>This value tells the user agent to always provide scrolling devices for the frame window.</summary>
        yes,
        /// <summary>This value tells the user agent not to provide scrolling devices for the frame window.</summary>
        no,
        /// <summary>This value tells the user agent to provide scrolling devices
        /// for the frame window when necessary. This is the default value.</summary>
        auto
    }

    /// <summary>When set, this boolean attribute specifies that this option is pre-selected.</summary>
    public enum Selected { selected }

    /// <summary>This attribute specifies the shape of a region.</summary>
    public enum Shape
    {
        /// <summary>Define a rectangular region.</summary>
        rect,
        /// <summary>Define a circular region.</summary>
        circle,
        /// <summary>Define a polygonal region.</summary>
        poly,
        /// <summary>Specifies the entire region.</summary>
        @default
    }

    /// <summary>This attribute specifies the vertical position of data within a cell.</summary>
    public enum Valign
    {
        /// <summary>Cell data is flush with the top of the cell.</summary>
        top,
        /// <summary>Cell data is centered vertically within the cell. This is the default value.</summary>
        middle,
        /// <summary>Cell data is flush with the bottom of the cell.</summary>
        bottom,
        /// <summary>All cells in the same row as a cell whose valign attribute has this value should have 
        /// their textual data positioned so that the first text line occurs on a baseline common to all cells
        /// in the row. This constraint does not apply to subsequent text lines in these cells.</summary>
        baseline
    }

    /// <summary>This attribute specifies the type of the value attribute.</summary>
    public enum ValueType
    {
        /// <summary>This is default value for the attribute. It means that the value specified by value 
        /// will be evaluated and passed to the object's implementation as a string.</summary>
        data,
        /// <summary>The value specified by value is a URI that designates a resource where run-time values are stored.
        /// This allows support tools to identify URIs given as parameters.
        /// The URI must be passed to the object as is, i.e., unresolved.</summary>
        @ref,
        /// <summary>The value specified by value is an identifier that refers to an OBJECT declaration in the same document.
        /// The identifier must be the value of the id attribute set for the declared OBJECT element.</summary>
        @object
    }
}
